package com.eudon.ai.agent.config;

import com.eudon.ai.agent.tools.FileOperationTool;
import com.eudon.ai.agent.tools.SearchTool;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.ai.tool.ToolCallbacks;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author eudon
 * @description 模型调用工具集中注册器
 * @date 2025/8/19
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
@Slf4j
@Configuration
public class ToolsRegister {
    @Resource
    private OtherProperties otherProperties;

    @Bean
    public ToolCallback[] allTools() {
        //后续进行扩展
        return ToolCallbacks.from(
                new FileOperationTool(),
                new SearchTool(otherProperties.getSearchApiKey())
        );
    }
}
